package com.vhall.component.framework.common.exception;

/**
 * 全局错误码枚举
 * 0-999 系统异常编码保留
 * 一般情况下，使用 HTTP 响应状态码 https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Status
 *
 * @author song.dong
 */
public interface GlobalErrorCode {
    ErrorCode SUCCESS = new ErrorCode(200, "success");
    ErrorCode FAILED = new ErrorCode(500, "failed");
    ErrorCode REQUEST_BAD = new ErrorCode(400, "request.bad");
    ErrorCode PATH_NOT_FOUND = new ErrorCode(404, "path.notfound");
    ErrorCode REQUEST_METHOD_INCORRECT = new ErrorCode(405, "request.method.incorrect");
    ErrorCode REQUEST_LOCKED = new ErrorCode(423, "request.locked");
    ErrorCode REQUEST_FREQUENTLY = new ErrorCode(429, "request.frequently");
}
